import type { GreasyForkElements } from '../../../../../../../../../types/constants/personalization/greasy_fork'
import {
  PAGE_ELEMENTS,
  PROJECT_PREFIX,
  SUPPORTED_PLATFORMS,
} from '../../../../../../../../../types/constants'

// 测试链接：https://greasyfork.org/zh-CN/reports/new?item_class=discussion&item_id=307828
export class ReportNewPage {
  elements: GreasyForkElements = PAGE_ELEMENTS[SUPPORTED_PLATFORMS.GREASY_FORK]
  private static instance: ReportNewPage

  /**
   * 获取单例实例
   */
  public static getInstance(): ReportNewPage {
    if (!ReportNewPage.instance) {
      ReportNewPage.instance = new ReportNewPage()
    }
    return ReportNewPage.instance
  }

  init(): void {
  }

  getMainStyles(): string {
    return `
.text-content {
  ul {
    li {
      color: var(--${PROJECT_PREFIX}-theme-danger-text) !important;
      font-weight: bold !important;
      padding: 2px 6px !important;
    }
  }
}
`
  }
}
